package com.service.business.borrow.controller.converter;

import cn.hutool.core.util.ObjectUtil;
import com.service.business.borrow.controller.req.MemberBorrowAddReq;
import com.service.dao.model.MemberBorrow;
import org.springframework.beans.BeanUtils;

public class MemberBorrowConverter {

    public static MemberBorrow converter(MemberBorrowAddReq req){
        if(ObjectUtil.isEmpty(req)){
            return null;
        }
        MemberBorrow memberBorrow = new MemberBorrow();
        BeanUtils.copyProperties(req,memberBorrow);
        return memberBorrow;
    }
}
